import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('./views/About.vue')
    },
    {
      path: '/orders/buy',
      name: 'ordersBuy',
      component: () => import('./views/orders/buy.vue')
    },
    {
      path: '/orders/sure',
      name: 'ordersSure',
      component: () => import('./views/orders/sure.vue')
    },
    {
      path: '/orders/list',
      name: 'ordersList',
      component: () => import('./views/orders/list.vue')
    },
    {
      path: '/orders/invoice',
      name: 'OrdersInvoice',
      component: () => import('./views/orders/invoice.vue')
    },
    {
      path: '/consume/index',
      name: 'ConsumeIndex',
      component: () => import('./views/consume/index.vue')
    },
    {
      path: '/consume/list',
      name: 'ConsumeList',
      component: () => import('./views/consume/list.vue')
    },
    {
      path: '/test',
      name: 'Test',
      component: () => import('./views/other/Test.vue')
    }
  ]
})
